import store from '../store'
import jwt from 'jwt-decode'

export default function init() {
    //本地存储和仓库关联
    if(localStorage.getItem('yj-user')){
        store.commit('loginModule/getUser',{
            username:jwt(localStorage.getItem('yj-user')).username,
            token:localStorage.getItem('yj-user')
        })
    }
}